#include <stdio.h>

void push(int *stack, int *size, int data)
{
    stack[*size] = data;
    (*size)++;
}

int pop(int *stack, int *size)
{
    (*size)--;
    return stack[*size];
}

void traverse(int *stack, int size)
{
    for (int i = 0; i < size; i++)
    {
        printf("%d ", stack[i]);
    }
    printf("\n");
}

int main()
{
    int stack[10];
    int size = 0;

    traverse(stack, size);

    push(stack, &size, 11);
    push(stack, &size, 22);
    push(stack, &size, 33);
    push(stack, &size, 44);
    push(stack, &size, 55);
    traverse(stack, size);

    pop(stack, &size);
    push(stack, &size, 66);
    // pop(stack, &size);
    traverse(stack, size);
}